﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Pay.aspx.cs" Inherits="DTcms.Web.WxSdjs.Pay" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <title></title>

    <style>
        .pay {
            width: 210px;
            height: 50px;
            border-radius: 15px;
            background-color: #00CD00;
            border: 0px #FE6714 solid;
            cursor: pointer;
            color: white;
            font-size: 16px;
        }
    </style>
</head>
<body>

    <div class="mask">
        <div class="bg"></div>
        <div class="pay_success flex_column">
            <h5>支付完成</h5>
            <i class="iconfont icon-duigou"></i>
            <p><span class="count_down">3</span>秒后自动跳转</p>
        </div>
    </div>

    <%--    <input id="pay" class="pay" value="立即支付" />
    <div id="logs">
    </div>--%>

    <script type="text/javascript" charset="utf-8" src="../scripts/jquery/jquery-1.11.2.min.js"></script>
    <script>
        var payType = '<%= payType %>';
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            WeixinJSBridge.invoke('getBrandWCPayRequest',
                <%=wxJsApiParam%>,
                function (res) {
                    if (res.err_msg == "get_brand_wcpay_request:ok") {
                        alert('payType:' + payType);
                    }
                    // 使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回ok，但并不保证它绝对可靠。
                    //因此微信团队建议，当收到ok返回时，向商户后台询问是否收到交易成功的通知，若收到通知，前端展示交易成功的界面；若此时未收到通知，商户后台主动调用查询订单接口，查询订单的当前状态，并反馈给前端展示相应的界面。
                });
        }, false);
    </script>


</body>
</html>
